

#ifndef UC_GELENT3D_H
#define UC_GELENT3D_H

#include "zgecurv3d.h"
#include "zgevec3d.h"
#include "zgepnt3d.h"
#pragma pack (push, 8)

class UcGeLine3d;
class UcGeCircArc3d;
class UcGePlanarEnt;
class
GE_DLLEXPIMPORT
UcGeLinearEnt3d : public UcGeCurve3d
{
public:

    ZSoft::Boolean intersectWith (const UcGeLinearEnt3d& line,
                                  UcGePoint3d& intPt,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean intersectWith (const UcGePlanarEnt& plane, UcGePoint3d& intPnt,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean projIntersectWith(const UcGeLinearEnt3d& line,
                                  const UcGeVector3d& projDir,
                                  UcGePoint3d& pntOnThisLine,
                                  UcGePoint3d& pntOnOtherLine,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean overlap       (const UcGeLinearEnt3d& line,
                                  UcGeLinearEnt3d*& overlap,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean isOn          (const UcGePoint3d& pnt,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isOn          (const UcGePoint3d& pnt, double& param,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isOn          (double param,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isOn          (const UcGePlane& plane,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean isParallelTo  (const UcGeLinearEnt3d& line,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isParallelTo  (const UcGePlanarEnt& plane,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isPerpendicularTo(const UcGeLinearEnt3d& line,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isPerpendicularTo(const UcGePlanarEnt& plane,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean isColinearTo  (const UcGeLinearEnt3d& line,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    void          getPerpPlane   (const UcGePoint3d& pnt, UcGePlane& plane) const;

    UcGePoint3d    pointOnLine   () const;
    UcGeVector3d   direction     () const;
    void           getLine       (UcGeLine3d&) const;

	UcGeVector3d   velocity       () const;	// INTERNAL USE ONLY

    UcGeLinearEnt3d& operator =  (const UcGeLinearEnt3d& line);

protected:
    UcGeLinearEnt3d ();
    UcGeLinearEnt3d (const UcGeLinearEnt3d&);
};

#pragma pack (pop)
#endif
